import request from '@/utils/request'

export function getGoodsSkuInfoByPurchaseId( purchaseId  ) {
  return request({
    url: '/webshop/GoodsPurchaseDetail/listGoodsSkuInfoByPurchaseId/' +  purchaseId,
    method: 'get'
  })
}


// 查询采购订单明细列表
export function listGoodsPurchaseDetail(query) {
  return request({
    url: '/webshop/GoodsPurchaseDetail/list',
    method: 'get',
    params: query
  })
}

// 查询采购订单明细详细
export function getGoodsPurchaseDetail(purchaseDetailId) {
  return request({
    url: '/webshop/GoodsPurchaseDetail/' + purchaseDetailId,
    method: 'get'
  })
}

// 新增采购订单明细
export function addGoodsPurchaseDetail(data) {
  return request({
    url: '/webshop/GoodsPurchaseDetail',
    method: 'post',
    data: data
  })
}

// 修改采购订单明细
export function updateGoodsPurchaseDetail(data) {
  return request({
    url: '/webshop/GoodsPurchaseDetail',
    method: 'put',
    data: data
  })
}

// 删除采购订单明细
export function delGoodsPurchaseDetail(purchaseDetailId) {
  return request({
    url: '/webshop/GoodsPurchaseDetail/' + purchaseDetailId,
    method: 'delete'
  })
}
